import re

slice = ['Resolving', 'github.com/AllenDang/w32:', "commit='9a4ee0f7d224efbff75947fa7060daadccc4741c',", 'urls=[https://github.com/AllenDang/w32.git,', 'git@github.com:AllenDang/w32.git]']

pn = re.compile(r'(\S+):$')
pc = re.compile("(?<=')(.*?)(?=')")
p = re.compile(r'(?P<folder>(\w+/)*)(?P<filename>\w+\.png)')
t = {}
while len(slice) > 0:
    e = slice.pop(0)
    if e == 'cache':
        t['transitive'] = 'false'
    if pn.search(e):
        t['name'] = pn.search(e).group(1)
    if e.startswith('commit='):
        commit = pc.search(e).group(1)
        t['commit'] = commit
    if e.startswith("urls="):
        t['url'] = ''
